﻿using System;
using System.Windows.Forms;

namespace Koonsoft.Relocate.Winform
{
    public partial class FrmSearch : Form
    {
        public FrmSearch()
        {
            InitializeComponent();
        }

        private void FrmSearch_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“relocateDataSet.BACKOUT_DESC”中。您可以根据需要移动或移除它。
            this.bACKOUT_DESCTableAdapter.FillByFullOption(this.relocateDataSet.BACKOUT_DESC);            
        }

        private void btnSearch_Click(object sender, EventArgs e)
        {       
            this.bACKOUT_RSTableAdapter.FillBySearchCondition(this.relocateDataSet.BACKOUT_RS,
                                                txtBoAddress.Text.Trim(), txtOwner.Text.Trim(), txtPositAddress.Text.Trim(), comboBox1.SelectedValue.ToString());

            dataGridView1.DataSource = relocateDataSet;
            dataGridView1.DataMember = "BACKOUT_RS";

            toolStripStatusLabel1.Text = string.Format("搜索共找到 {0} 条记录", relocateDataSet.BACKOUT_RS.Rows.Count.ToString());
        }
    }
}
